import { h } from 'preact';
import classNames from 'classnames';
import getConfig from '../utils/config';

const config = getConfig().Icon;

const Icon = ({ type,className, color, style={}, ...other }) => {
	style.color = style.color||color;
	return <i style={{ ...style }} className={classNames(config.className,{ [`${config.className}-${type}`]: !!type,[`${className}`]: !!className } )} {...other} />;
}

Icon.propTypes = {
	// type: undefined
};

export default Icon;
